<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The CairoStatus class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="class.cairoexception.html">CairoException</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="class.cairosurface.html">CairoSurface</a></div>
 <div class="up"><a href="book.cairo.html">Cairo</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.cairostatus" class="reference">

 <h1 class="title">The CairoStatus class</h1>
 

 <div class="partintro"><p class="verinfo">(No version information available, might only be in Git)</p>


  <div class="section" id="cairostatus.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    <strong class="classname">CairoStatus</strong> is used to indicate errors that can occur when using Cairo.
    In some cases it is returned directly by functions. but when using <a href="class.cairocontext.html" class="classname">CairoContext</a>,
    the last error, if any, is stored in the object and can be retrieved with <span class="methodname"><a href="cairocontext.status.html" class="methodname">CairoContext::status()</a></span>
    or <span class="function"><a href="cairopattern.status.html" class="function">cairo_status()</a></span>. New entries may be added in future versions.
    </p>
    <p class="para">Use <span class="methodname"><a href="cairo.statustostring.html" class="methodname">Cairo::statusToString()</a></span> or  <span class="function"><a href="cairo.statustostring.html" class="function">cairo_status_to_string()</a></span> to get a
        human-readable representation of an error message.
    </p>
  </div>


  <div class="section" id="cairostatus.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">CairoStatus</strong>
     </span>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 常量 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.success"><var class="varname">SUCCESS</var></a></var>
     <span class="initializer"> = 0</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.no-memory"><var class="varname">NO_MEMORY</var></a></var>
     <span class="initializer"> = 1</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.invalid-restore"><var class="varname">INVALID_RESTORE</var></a></var>
     <span class="initializer"> = 2</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.invalid-pop-group"><var class="varname">INVALID_POP_GROUP</var></a></var>
     <span class="initializer"> = 3</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.no-current-point"><var class="varname">NO_CURRENT_POINT</var></a></var>
     <span class="initializer"> = 4</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.invalid-matrix"><var class="varname">INVALID_MATRIX</var></a></var>
     <span class="initializer"> = 5</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.invalid-status"><var class="varname">INVALID_STATUS</var></a></var>
     <span class="initializer"> = 6</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.null-pointer"><var class="varname">NULL_POINTER</var></a></var>
     <span class="initializer"> = 7</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.invalid-string"><var class="varname">INVALID_STRING</var></a></var>
     <span class="initializer"> = 8</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.invalid-path-data"><var class="varname">INVALID_PATH_DATA</var></a></var>
     <span class="initializer"> = 9</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.read-error"><var class="varname">READ_ERROR</var></a></var>
     <span class="initializer"> = 10</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.write-error"><var class="varname">WRITE_ERROR</var></a></var>
     <span class="initializer"> = 11</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.surface-finished"><var class="varname">SURFACE_FINISHED</var></a></var>
     <span class="initializer"> = 12</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.surface-type-mismatch"><var class="varname">SURFACE_TYPE_MISMATCH</var></a></var>
     <span class="initializer"> = 13</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.pattern-type-mismatch"><var class="varname">PATTERN_TYPE_MISMATCH</var></a></var>
     <span class="initializer"> = 14</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.invalid-content"><var class="varname">INVALID_CONTENT</var></a></var>
     <span class="initializer"> = 15</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.invalid-format"><var class="varname">INVALID_FORMAT</var></a></var>
     <span class="initializer"> = 16</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.invalid-visual"><var class="varname">INVALID_VISUAL</var></a></var>
     <span class="initializer"> = 17</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.file-not-found"><var class="varname">FILE_NOT_FOUND</var></a></var>
     <span class="initializer"> = 18</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.invalid-dash"><var class="varname">INVALID_DASH</var></a></var>
     <span class="initializer"> = 19</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.invalid-dsc-comment"><var class="varname">INVALID_DSC_COMMENT</var></a></var>
     <span class="initializer"> = 20</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.invalid-index"><var class="varname">INVALID_INDEX</var></a></var>
     <span class="initializer"> = 21</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.clip-not-representable"><var class="varname">CLIP_NOT_REPRESENTABLE</var></a></var>
     <span class="initializer"> = 22</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.temp-file-error"><var class="varname">TEMP_FILE_ERROR</var></a></var>
     <span class="initializer"> = 23</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.cairostatus.html#cairostatus.constants.invalid-stride"><var class="varname">INVALID_STRIDE</var></a></var>
     <span class="initializer"> = 24</span>
    ;</div>

    
   }</div>


  </div>
  

  <div class="section" id="cairostatus.constants">
   <h2 class="title">预定义常量</h2>
   <dl>


    
     <dt id="cairostatus.constants.success"><strong><code>CairoStatus::SUCCESS</code></strong></dt>

     <dd>

      <p class="para">No error has occurred </p>
     </dd>

    

    
     <dt id="cairostatus.constants.no-memory"><strong><code>CairoStatus::NO_MEMORY</code></strong></dt>

     <dd>

      <p class="para">Out of memory</p>
     </dd>

    

    
     <dt id="cairostatus.constants.invalid-restore"><strong><code>CairoStatus::INVALID_RESTORE</code></strong></dt>

     <dd>

      <p class="para"><span class="function"><a href="cairocontext.restore.html" class="function">cairo_restore()</a></span> called without matching <span class="function"><a href="cairocontext.save.html" class="function">cairo_save()</a></span></p>
     </dd>

    

    
     <dt id="cairostatus.constants.invalid-pop-group"><strong><code>CairoStatus::INVALID_POP_GROUP</code></strong></dt>

     <dd>

      <p class="para">No saved group to pop </p>
     </dd>

    

    
     <dt id="cairostatus.constants.no-current-point"><strong><code>CairoStatus::NO_CURRENT_POINT</code></strong></dt>

     <dd>

      <p class="para">No current point defined </p>
     </dd>

    

    
     <dt id="cairostatus.constants.invalid-matrix"><strong><code>CairoStatus::INVALID_MATRIX</code></strong></dt>

     <dd>

      <p class="para">Invalid matrix (not invertible) </p>
     </dd>

    

    
     <dt id="cairostatus.constants.invalid-status"><strong><code>CairoStatus::INVALID_STATUS</code></strong></dt>

     <dd>

      <p class="para">Invalid value for an input CairoStatus&gt;</p>
     </dd>

    

    
     <dt id="cairostatus.constants.null-pointer"><strong><code>CairoStatus::NULL_POINTER</code></strong></dt>

     <dd>

      <p class="para">Null pointer</p>
     </dd>

    

    
     <dt id="cairostatus.constants.invalid-string"><strong><code>CairoStatus::INVALID_STRING</code></strong></dt>

     <dd>

      <p class="para">Input string not valid UTF-8 string</p>
     </dd>

    

    
     <dt id="cairostatus.constants.invalid-path-data"><strong><code>CairoStatus::INVALID_PATH_DATA</code></strong></dt>

     <dd>

      <p class="para">Input path data not valid </p>
     </dd>

    

    
     <dt id="cairostatus.constants.read-error"><strong><code>CairoStatus::READ_ERROR</code></strong></dt>

     <dd>

      <p class="para">Error while reading from input stream </p>
     </dd>

    

    
     <dt id="cairostatus.constants.write-error"><strong><code>CairoStatus::WRITE_ERROR</code></strong></dt>

     <dd>

      <p class="para">Error while writing to output stream </p>
     </dd>

    

    
     <dt id="cairostatus.constants.surface-finished"><strong><code>CairoStatus::SURFACE_FINISHED</code></strong></dt>

     <dd>

      <p class="para">Target surface has been finished</p>
     </dd>

    

    
     <dt id="cairostatus.constants.surface-type-mismatch"><strong><code>CairoStatus::SURFACE_TYPE_MISMATCH</code></strong></dt>

     <dd>

      <p class="para">The surface type is not appropriate for the operation </p>
     </dd>

    

    
     <dt id="cairostatus.constants.pattern-type-mismatch"><strong><code>CairoStatus::PATTERN_TYPE_MISMATCH</code></strong></dt>

     <dd>

      <p class="para">The pattern type is not appropriate for the operation </p>
     </dd>

    

    
     <dt id="cairostatus.constants.invalid-content"><strong><code>CairoStatus::INVALID_CONTENT</code></strong></dt>

     <dd>

      <p class="para">Invalid value for an input <a href="class.cairocontent.html" class="classname">CairoContent</a></p>
     </dd>

    

    
     <dt id="cairostatus.constants.invalid-format"><strong><code>CairoStatus::INVALID_FORMAT</code></strong></dt>

     <dd>

      <p class="para">Invalid value for an input <a href="class.cairoformat.html" class="classname">CairoFormat</a></p>
     </dd>

    

    
     <dt id="cairostatus.constants.invalid-visual"><strong><code>CairoStatus::INVALID_VISUAL</code></strong></dt>

     <dd>

      <p class="para">Invalid value for an input Visual</p>
     </dd>

    

    
     <dt id="cairostatus.constants.file-not-found"><strong><code>CairoStatus::FILE_NOT_FOUND</code></strong></dt>

     <dd>

      <p class="para">File not found</p>
     </dd>

    

    
     <dt id="cairostatus.constants.invalid-dash"><strong><code>CairoStatus::INVALID_DASH</code></strong></dt>

     <dd>

      <p class="para">Invalid value for a dash setting </p>
     </dd>

    

    
     <dt id="cairostatus.constants.invalid-dsc-comment"><strong><code>CairoStatus::INVALID_DSC_COMMENT</code></strong></dt>

     <dd>

      <p class="para">Invalid value for a DSC comment</p>
     </dd>

    

    
     <dt id="cairostatus.constants.invalid-index"><strong><code>CairoStatus::INVALID_INDEX</code></strong></dt>

     <dd>

      <p class="para">Invalid index passed to getter</p>
     </dd>

    

    
     <dt id="cairostatus.constants.clip-not-representable"><strong><code>CairoStatus::CLIP_NOT_REPRESENTABLE</code></strong></dt>

     <dd>

      <p class="para">Clip region not representable in desired format</p>
     </dd>

    

    
     <dt id="cairostatus.constants.temp-file-error"><strong><code>CairoStatus::TEMP_FILE_ERROR</code></strong></dt>

     <dd>

      <p class="para">Error creating or writing to a temporary file</p>
     </dd>

    

    
     <dt id="cairostatus.constants.invalid-stride"><strong><code>CairoStatus::INVALID_STRIDE</code></strong></dt>

     <dd>

      <p class="para">Invalid value for <strong class="classname">CairoStride</strong></p>
     </dd>

    

   </dl>

  </div>



 </div>

 

</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="class.cairoexception.html">CairoException</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="class.cairosurface.html">CairoSurface</a></div>
 <div class="up"><a href="book.cairo.html">Cairo</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
